
// 引入包名
import http from '@ohos.net.http';
let key="5d2d3e6c0d5188bec134fc4fc1b139e0"
export const  getCityApi=(params)=>{
    // 每一个httpRequest对应一个HTTP请求任务，不可复用
    let httpRequest = http.createHttp();
    return httpRequest.request(
        `https://restapi.amap.com/v3/config/district?keywords=${params}&key=${key}`,
        {
            method: http.RequestMethod.GET, // 可选，默认为http.RequestMethod.GET
            // 开发者根据自身业务需要添加header字段

        },
    )
}
